#ifndef _PUBLIC_H_
#define _PUBLIC_H_

#include "stm32f10x_conf.h"

/*********************************************************************************************
** Function name:           gpio_conf
** Descriptions:            GPIO配置
** input parameters:        GPIOx：GPIO类型
                            Pins: GPIO引脚
                            Mode: GPIO模式
                            Speed: GPIO速度
** output parameters:       
** Returned value:          SMAG_SUCCESS: 成功
** Created by:              zheh.zhang
** Created date:            2021-09-03
**--------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
**********************************************************************************************/
void gpio_conf(GPIO_TypeDef *GPIOx, uint16_t Pins, GPIOMode_TypeDef Mode, GPIOSpeed_TypeDef Speed);


/*********************************************************************************************
** Function name:           nvic_conf
** Descriptions:            中断配置
** input parameters:        Channel：通道
                            Priority: 优先级
                            SubPriority: 次优先级
                            State: 使能状态
** output parameters:       none
** Returned value:          none
** Created by:              zheh.zhang
** Created date:            2021-09-03
**--------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
**********************************************************************************************/
void nvic_conf(uint8_t Channel, uint8_t Priority, uint8_t SubPriority, FunctionalState State);

/*********************************************************************************************
** Function name:           uart_conf
** Descriptions:            串口配置
** input parameters:        baud: 波特率
                            WordLength: 字长
                            StopBits: 停止位
                            Parity: 校验位
** output parameters:       none
** Returned value:          none
** Created by:              zheh.zhang
** Created date:            2021-09-03
**--------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
**********************************************************************************************/
void uart_conf(USART_TypeDef *USARTx, uint32_t baud, uint16_t WordLength, uint16_t StopBits, uint16_t Parity);



#endif


